package com.xiguanlezz.cn.common.notify;

import java.io.Serializable;
import java.util.concurrent.atomic.AtomicLong;

/**
 * @Author：习惯了种种
 * @CreateDate：2024/11/28 17:01
 * @Description：事件基类
 */
public abstract class Event implements Serializable {
    private static final long serialVersionUID = 5097460435558520830L;

    private static final AtomicLong SEQUENCE = new AtomicLong(0);

    private final long sequence = SEQUENCE.getAndIncrement();

    /**
     * 每个事件自增的序号
     */
    public long sequence() {
        return sequence;
    }

    /**
     * 事件作用域标记
     */
    public String scope() {
        return null;
    }

}
